public class Puppy {
	int puppyAge;
	public Puppy(String name) {
		// 该构造器仅有的一个参数： name
		System.out.println("Passed Name is :" + name);
	}
	
	public void setAge(int age) {
		puppyAge = age;
	}
	
	public int getAge() {
		System.out.println("Puppy's age is :" + puppyAge);
		return puppyAge;
	}
	
	public static void main(String []args) {
		/* 创建对象 */
		Puppy myPuppy = new Puppy("tommy");
		/* 通过方法来设定 age */
		myPuppy.setAge(2);
		/* 通过另外一个方法来获得 age */
		myPuppy.getAge();
		/* 或者想下面这样来访问成员变量 */
		System.out.println("Variable Value :" + myPuppy.puppyAge);
	}
}